home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / AppleSearch / Windows / AppleSearch for Windows SDK / H / ASCLIERR.H next >
Encoding:
C/C++ Source or Header  |  1995-11-25  |  9.7 KB  |  222 lines  |  [TEXT/dosa]

  1. //==============================================================================
  2. //    File: ASClientErrors.h
  3. //
  4. //    Copyright (C) 1992-1995 Apple Computer, Inc.  All rights reserved.
  5. //
  6. //    Description:     The definition of errors that can be generated by either the
  7. //                        client or server.  In general, the 1000 series code are those
  8. //                        generated by the server, while the 3000 series codes are
  9. //                        generated by the client.
  10. //
  11. //    Change History: (moved to bottom of file)
  12. //==============================================================================
  13.  
  14. #ifndef ASCLIERR_H
  15. #define ASCLIERR_H
  16.  
  17.  
  18. //------------------------------------------------------------------------------
  19. // Dependencies
  20. //------------------------------------------------------------------------------
  21.  
  22. #ifndef DPAPI_H
  23.     #ifdef WINDOWS
  24.         #include "dpapi.h"
  25.     #endif // WINDOWS
  26.     #ifdef MACINTOSH
  27.         #include "DarkPassageAPI.h"
  28.     #endif // MACINTOSH
  29. #endif // DPAPI_H
  30.  
  31.  
  32. //------------------------------------------------------------------------------
  33. // Constants for Parameter Block Range Checking
  34. //------------------------------------------------------------------------------
  35.  
  36. // Search
  37.  
  38. const long    kMinQuerySize                = 1;
  39. const long    kMaxQuerySize                = 1000;
  40. const long    kMinRankAllowed            = 1;
  41. const long    kMaxRankAllowed            = 5;
  42. const long    kMinHitsAllowed            = 1;
  43. const long    kMaxHitsAllowed            = 30000;
  44.  
  45. // Reporter
  46.  
  47. const long    kMaxReporterName            = 20;
  48. const long    kMinReporterQuerySize    = 0;
  49. const long    kMinReporterSources        = 0;
  50. const long    kMinReporterFlags            = 0;
  51. const long    kMaxReporterFlags            = 1;
  52. const long    kMaxDeliveryDays            = 0x7F;        // all seven days of the week
  53. const long    kMaxDeliveryTime            = 86399L;    // 11:59:59PM in ticks
  54.  
  55. // GetText/Original
  56.  
  57. const long    kMinTextSize                = 1;
  58. const long    kMaxTextSize                = 30000; // this is the server maximum
  59.                                                             // and may not necessarily be the
  60.                                                             // operating text size limit imposed
  61.                                                             // in the client
  62. const long    kMaxGetOriginalFileFlag    = 2;
  63.  
  64. // GetRelatedTerms
  65.  
  66. const long    kMinTermsAllowed            = 1;
  67. const long    kMaxTermsAllowed            = 100;
  68.  
  69.  
  70.  
  71.  
  72. //------------------------------------------------------------------------------
  73. // Error Codes Generated by the Client
  74. //------------------------------------------------------------------------------
  75.  
  76. // OS level error
  77.  
  78. const ASErr    kUnknownErr                            = 3000;
  79. const ASErr    kOutOfMemoryErr                    = 3001;
  80. const ASErr    kOutOfMemoryNoObjectErr            = 3002;
  81. const ASErr    kOutOfMemoryNoPBErr                = 3003;
  82. const ASErr kFileSystemErr                        = 3004;
  83. const ASErr kFileRenamedWarning                = 3005;
  84.  
  85.  
  86. //------------------------------------------------------------------------------
  87. // House-Keeping Function Errors
  88. //------------------------------------------------------------------------------
  89.  
  90. const ASErr    kMaxRegisteredErr                    = 3101;
  91. const ASErr    kInvalidRegistrationIDErr        = 3102;
  92. const ASErr    kAlreadyLoggedOnErr                = 3103;
  93. const ASErr    kLogOnCancelErr                    = 3104;
  94. const ASErr    kStillLoggedOnErr                    = 3105;
  95. const ASErr    kNotLoggedOnErr                    = 3106;
  96. const ASErr    kNoIdentificationErr                = 3108;
  97. const ASErr    kNoCompletionProcErr                = 3109;
  98. const ASErr    kAlreadyLoggingOnErr                = 3112;
  99. const ASErr    kLogoffPendingErr                    = 3113;
  100.  
  101. //const ASErr    kAuthExtensionNotFoundErr        = 3201;
  102. //const ASErr    kAuthExtensionOutOfMemoryErr    = 3202;
  103.  
  104.  
  105. const ASErr    kInvalidDeliveryDaysErr            = 3407;
  106. const ASErr    kInvalidDeliveryTimeErr            = 3408;
  107. const ASErr kDeliveryAlreadyInProgressErr = 3410;
  108.  
  109. // session errors
  110.  
  111. const ASErr    kReplyMatchesNoRequestErr        = 3601;
  112. const ASErr    kInvalidReplyDataErr                = 3602;
  113. const ASErr    kInvalidRequestDataErr            = 3603;
  114. const ASErr    kCommStackErr                        = 3604;
  115. const ASErr    kTransactionTimedOutErr            = 3605;
  116.  
  117. // other errors
  118. const ASErr    kUsingDfltDeliveryDir            = 3606;
  119. const ASErr    kConsultASLogErr                    = 3607;
  120. const ASErr    kBadImportFileErr                    = 3608;
  121. const ASErr    kReporterDeliveryAborted        = 3609;
  122.  
  123. // The following error codes are not in the final API spec and seem to be
  124. //    left over from an earlier version of the project.
  125.  
  126. // search errors
  127.  
  128. const ASErr    kQueryLengthRangeErr                = 1017;    // (kNoQueryString); used to be 3301
  129. const ASErr    kQueryEmptyStringErr                = 1017;    // (kNoQueryString); used to be 3302
  130. const ASErr    kQueryMissingStringErr            = 1017;    // (kNoQueryString); used to be 3303
  131. const ASErr    kQueryStringMissingErr            = 1017;    // (kNoQueryString); used to be 3304
  132. const ASErr    kMaxHitsRangeErr                    = 1020;    // (kInvalidMaxHits); used to be 3306
  133.  
  134. // reporter errors
  135.  
  136. const ASErr    kReporterNameEmptyErr            = 1025;    // (kInvalidObjectName); used to be 3402
  137. const ASErr    kReporterNameLengthErr            = 1025;    // (kInvalidObjectName); used to be 3403
  138. const ASErr    kReporterNameMissingErr            = 1025;    // (kInvalidObjectName); used to be 3404
  139. const ASErr    kDeliveryDirLengthErr            = 1026;    // (kInvalidObjectData); used to be 3405
  140. const ASErr    kDeliveryDirMissingErr            = 1026;    // (kInvalidObjectData); used to be 3406
  141. const ASErr    kReporterSourceCountErr            = 3409;
  142. const ASErr    kMissingSourceErr                    = 1006;    // (kInvalidSourceID); used to be 3410
  143.  
  144. // dbObject errors
  145.  
  146. const ASErr    kDBObjectNameLengthErr            = 1025;    // (kInvalidObjectName); used to be 3502
  147. const ASErr    kDBObjectNameMissingErr            = 1025;    // (kInvalidObjectName); used to be 3503
  148. const ASErr    kDBObjectDataLengthErr            = 1026;    // (kInvalidObjectData); used to be 3504
  149. const ASErr    kDBObjectDataMissingErr            = 1026;    // (kInvalidObjectData); used to be 3505
  150.  
  151. // *** end of old error codes ***
  152.  
  153.  
  154.  
  155. //----------------------------------------------------------------------------------------------------
  156. // Error Codes Returned by the Server
  157. //----------------------------------------------------------------------------------------------------
  158.  
  159. const ASErr kInvalidRequestForGuestErr    = 1001;    // when guests try to make database requests
  160. const ASErr kInvalidSessionIDErr            = 1002;    // when client sends a non-existing session ID
  161. const ASErr kRequestIDNotFoundErr        = 1003;    // when client tries to cancel an invalid request
  162. const ASErr kSessionIDNotFoundErr        = 1004;    // when client tries to log off with invalid session ID
  163. const ASErr kTransactionFailedErr        = 1005;    // requested pls transaction failed
  164. const ASErr kInvalidSourceIDErr            = 1006;    // when client sends a non-existing info source ID
  165. const ASErr kInvalidDocIDErr                = 1007;    // when client sends a non-existing document ID
  166. const ASErr kNoAccessPriviligesErr        = 1008;    // when client tries to access a file for which he doesn't
  167.                                                                 //    have access
  168. const ASErr kServerGoingDownErr            = 1009;    // when the server is in the process of shutting down
  169. const ASErr kInvalidObjectIDErr            = 1010;    // object id for ObjectRequest is bad
  170. const ASErr kNoSharingOnServerErr        = 1011;    // server doesn't have File Sharing or AppleShare running
  171. const ASErr kWrongProtocolErr                = 1012;    // client is using the wrong protocol version
  172. const ASErr kFileNotFoundErr                = 1013;    // GetFile wasn't able to locate the file
  173. const ASErr kDuplicateNameErr                = 1014;    // Tried to add reporter with name that exists
  174. const ASErr kTooManyUsersErr                = 1015;    // Max # of users already logged in
  175. const ASErr kInfoSourceHiddenErr            = 1016;     // Info source on which you tried to execute this request is
  176.                                                                 //    Hidden.
  177. const ASErr kNoQueryStringErr                = 1017;     // when client sends a zero-lebgth query string
  178. const ASErr kQueryStringTooLongErr        = 1018;     // when client sends a very long query string
  179. const ASErr kInvalidMinRankErr            = 1019;     // min rank requested not in the range (1..5)
  180. const ASErr kInvalidMaxHitsErr            = 1020;     // Max hits requested <= 0 on search request
  181. const ASErr kInvalidMaxTermsErr            = 1021;     // Max terms requested <= 0 on related terms request
  182. const ASErr kInvalidTextBoundsErr        = 1022;     // The startByte/endByte combo doesn't make sense
  183. const ASErr kInvalidOperationErr            = 1023;     // Invalid operation in DBObject/DBDBReporter request
  184. const ASErr kInvalidObjectTypeErr        = 1024;    // invalid objectType in DBObject/DBEnumerate req
  185. const ASErr kInvalidObjectNameErr        = 1025;    // bogus objectName
  186. const ASErr kInvalidObjectDataErr        = 1026;    // objectDataSize is bogus
  187. const ASErr kInvalidFlagsErr                = 1027;    // Flags field is invalid (DBReporter/GetFile)
  188. const ASErr kInvalidSubSessionIDErr        = 1028;    // invalid subSessionID
  189. const ASErr kDuplicateTickleErr            = 1029;     // duplicate Tickle request
  190. const ASErr kParamErr                        = 1030;     // received a mal-formed request (too short, or too long)
  191. const ASErr kInternalErr                    = 1031;     // Bad things happened on the server.  May be it's time to
  192.                                                                 //        restart.
  193. const ASErr kQuerySyntaxErr                = 1032;    // Syntax error in query
  194. const ASErr kFileModSinceIndexErr        = 1033;    // The file has been modified since indexing, so you can't
  195.                                                                 //        do GetText on it.
  196. const ASErr kDiskFull                        = 1035;    // Disk is full on server. Can't complete request
  197. const ASErr kDemoError                        = 1036;    // The limits of the demonstration version have been exceeded
  198. const ASErr kGatewayLost                    = 1037;    // Could not make contact with the gateway
  199. const ASErr kNoValidDates                    = 1038;    // No articles for Update had valid dates
  200.  
  201. const ASErr kWAISError                        = 1039;  // WAIS server violated protocol
  202. const ASErr    kWAISSrcUnavailable            = 1040;  // WAIS server unavailable, try later
  203. const ASErr    kTCPProblem                        = 1041;  // TCP error in Internet communication
  204. const ASErr    kServerTooBusy                    = 1042;    // Server is overloaded and cannot handle the request
  205.  
  206.  
  207. #endif // ASCLIERR_H
  208.  
  209. //==============================================================================
  210. //    Change History:
  211. //
  212. //        Date        By        Description
  213. //        ----        --        -----------
  214. //        03/16/94    SW        Changed include declarations.
  215. //
  216. // $Log: /bogart/dp/shared/ASCLIERR.H $
  217. // 
  218. // 17    4/18/95 7:33p Rjohnson
  219. //
  220. //==============================================================================
  221.  
  222.